<?php 
use yii\widgets\LinkPager;
use yii\helpers\Url;
?>
<?php $this->beginBlock('style'); ?>
<link rel="stylesheet" type="text/css" href="css/index.css">
<?php $this->endBlock(); ?>


<?php $this->beginBlock('content'); ?>
    
    <div class="module box-common">
        <?php foreach($list as $item):?>
    	<div class="post">
    		<h3 class="post-title"><a href="<?php echo Url::to(array('article/view','id'=>$item->id));?>" target="_blank"><?php echo$item->title;?></a></h3>
    		<div>
    		    <ul class="row">
    		        <li class="col-xs-7 col-md-3 col-lg-3">
    		            <i class="fa fa-calendar"></i> <?php echo date('Y-m-d H:i',$item->publish_time);?>
    		        </li>
    		        <li class="col-xs-5 col-md-2 col-lg-2">
    		            <i class="fa fa-list-alt"></i> <a href="https://baijunyao.com/category/30" target="_blank"><?php echo $item->category->name?></a>
    		        </li>
    		        
    		        <li class="col-xs-7 col-md-5 col-lg-4">
    		             <?php if(!empty($item->tags)):?>
    		             <i class="fa fa-tags"></i>
    		             <?php foreach($item->tags as $tag):?>
    			         <a class="b-tag-name" href="https://baijunyao.com/tag/25" target="_blank"><?php echo $tag->name;?></a>
    			         <?php endforeach;?>
    			        <?php endif;?>
    				</li>
    		    </ul>
    		</div>
    	</div>
        <?php endforeach;?>
    </div>
        <div class="module box-common">
        <?php 
            echo LinkPager::widget([
                'pagination' => $pager,
            ]);
        ?>
        </div>
<?php $this->endBlock(); ?>
